import request from '@/utils/request'

export function getSubscriberList(query) {
  if(query != undefined){
    query = JSON.parse(JSON.stringify(query))
  }
  return request({
    url: '/authority/subscriber/getList',
    method: 'post',
    data: query
  })
}

export function fetchDepartmentAvailable(query) {
  return request({
    url: '/authority/subscriber/getAvailable',
    method: 'post',
    data: query
  })
}

export function getSubscriberDetail(id) {
  return request({
    url: '/authority/subscriber/getDetail',
    method: 'post',
    data: id 
  })
}

export function saveSubscriber(id) {
  return request({
    url: '/authority/subscriber/save',
    method: 'post',
    data: id
  })
}

export function removeSubscriberByID(id) {
  return request({
    url: '/authority/subscriber/delete',
    method: 'post',
    data: id
  })
}

export function changeSubscriberStatusByID(id) {
  return request({
    url: '/authority/subscriber/change-status',
    method: 'post',
    data: id
  })
}

